package cn.backpackerxl.service.impl;

import cn.backpackerxl.dao.SourceDao;
import cn.backpackerxl.dao.TeacherDao;
import cn.backpackerxl.easyJDBC.main.EasyJDBCExecutor;
import cn.backpackerxl.easyJDBC.main.EasyJDBCRepository;
import cn.backpackerxl.entity.Source;
import cn.backpackerxl.service.SourceService;

import java.util.List;

/**
 * @Author: backpackerxl
 * CreateTime: 2022/5/2
 * FileName: SourceServiceImpl
 **/
public class SourceServiceImpl implements SourceService {
    private final SourceDao sourceDao = (SourceDao) new EasyJDBCRepository(SourceDao.class).init();

    @Override
    public List<Source> findByName(String name) {
        return sourceDao.findByOne(name);
    }

    @Override
    public Source findByHadoopAndJavaWeb(String hadoop, String javaWeb) {
        return sourceDao.findByOneAndOther(hadoop, javaWeb);
    }
}
